package cn.fboost.mtos.mapper;

import cn.fboost.mtos.dto.request.PageRequest;
import cn.fboost.mtos.entity.ProductRate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductRateMapper {
    int create(ProductRate productRate);
    ProductRate findByOrderId(int orderId);
    List<ProductRate> listByProductId(@Param("productId") int productId, @Param("pagination") PageRequest.PageOffset pagination);
    List<ProductRate> listByUserId(int id);
    List<Integer> listAllByProductId(int id);
}
